def do_rank_class(index):
    """返回首页新闻排行对应的class"""
    # assert 0 <= index < 3, 'index must be [0, 3)'
    if index < 0 or index >= 3:
        return ''

    rank_class_li = ['first', 'second', 'third']

    return rank_class_li[index]